#pragma once
#include <string>
#include <sstream>
using namespace std;


class AppObjectException{

public:
	string errorMsg;

public:
			
	AppObjectException(string g):errorMsg(g){};
	AppObjectException(const AppObjectException& Xc){
		this->errorMsg = Xc.errorMsg;
	};
	AppObjectException* operator+(const AppObjectException& Xc){
		AppObjectException* Ptr = new AppObjectException(*this);
		Ptr->errorMsg += Xc.errorMsg;
		return Ptr;	
	};

	virtual ~AppObjectException( ){};
};


/*class CObject{

};*/

class AppObject : public CObject{


public:
	typedef AppObject* pointer;
	typedef AppObject& reference;
	typedef const AppObject& const_reference;
	typedef AppObjectException exception;

protected:
	long unsigned int m_ID;		
	static pair<long unsigned int, long unsigned int> TotalCount(signed short=0);

public:	
	virtual string toString() const;
	static  long unsigned int CurrentAllocated( ) {return TotalCount( ).first;};


public:
	AppObject( ); 	
	AppObject(const_reference);
	virtual ~AppObject( ); 	
	

}; 







